/**
 * The Community Project
 * Copyright Team1 Productions
 * 
 * Joshua Amick
 * Stephen Cunningham
 * Thema Davis
 * Tomika Dawson
 * Lucie DeCristofaro
 * 
 * All Rights Reserved.
 */

package com.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.constants.UserPermissions;
@Entity
@Table(name="users")
public class User extends BaseObject implements Serializable{
	private String username;
	private String password;
	private String email;
	private UserPermissions userPermissions;
	private boolean subscribedToEmails;
	private Profile profile;
	
	@Column(name="email", length=128)
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column(name="password", length=32)
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column(name="username", length=32)
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	@Column(name="user_permissions")
	public UserPermissions getUserPermissions() {
		return userPermissions;
	}
	public void setUserPermissions(UserPermissions userPermissions) {
		this.userPermissions = userPermissions;
	}
	
	@OneToOne
	public Profile getProfile() {
		return profile;
	}
	public void setProfile(Profile profile) {
		this.profile = profile;
	}
	
	@Column(name="subscribed_to_emails")
	public boolean isSubscribedToEmails() {
		return subscribedToEmails;
	}
	public void setSubscribedToEmails(boolean subscribedToEmails) {
		this.subscribedToEmails = subscribedToEmails;
	}
	
	
}
